<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg bgys">
<div class="wrapper wrapper-content animated fadeInRight ibox-content bgystz">
    <form class="form-horizontal m" id="form-keep-edit" th:object="${keep}">
        <input id="id" name="id" th:field="*{id}" type="hidden">
        <input id="pointId" name="pointId" th:field="*{pointId}"  type="hidden">
        <input id="basicsId" name="basicsId" th:field="*{basicsId}"  type="hidden">
        <div class="col-md-3" th:hidden="${month!='丰'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>丰水期电量峰段：</label>
                <div class="col-sm-8">
                    <input id="fF" name="fF" th:field="*{fF}" class="form-control tx" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-3" th:hidden="${month!='丰'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>平段：</label>
                <div class="col-sm-8">
                    <input id="fP" name="fP" th:field="*{fP}" class="form-control tx" type="number">
                </div>
            </div>
        </div>
        <div class="col-md-3" th:hidden="${month!='丰'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>谷段：</label>
                <div class="col-sm-8">
                    <input id="fG" name="fG" th:field="*{fG}" class="form-control tx" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-3" th:hidden="${month!='丰'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="丰水期电量峰段加丰水期电量平段加丰水期电量谷段">小计：</label>
                <div class="col-sm-8">
                    <input id="fTotal" name="fTotal" th:field="*{fTotal}" class="form-control srk"
                           readonly="true"   type="number">
                </div>
            </div>
        </div>

        <div class="col-md-12">
        </div>

        <div class="col-md-3" th:hidden="${month!='平'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>平水期电量峰段：</label>
                <div class="col-sm-8">
                    <input id="pF" name="pF" th:field="*{pF}" class="form-control tx"  type="number">
                </div>
            </div>
        </div>

        <div class="col-md-3" th:hidden="${month!='平'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>平段：</label>
                <div class="col-sm-8">
                    <input id="pP" name="pP" th:field="*{pP}" class="form-control tx" type="number">
                </div>
            </div>
        </div>
        <div class="col-md-3" th:hidden="${month!='平'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>谷段：</label>
                <div class="col-sm-8">
                    <input id="pG" name="pG" th:field="*{pG}" class="form-control tx" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-3" th:hidden="${month!='平'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="平水期电量峰段加平水期电量平段加平水期电量谷段">小计：</label>
                <div class="col-sm-8">
                    <input id="pTotal" name="pTotal" th:field="*{pTotal}" class="form-control srk"
                           readonly="true" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-12">
        </div>

        <div class="col-md-3" th:hidden="${month!='枯'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>峰段：</label>
                <div class="col-sm-8">
                    <input id="kF" name="kF" th:field="*{kF}" class="form-control tx" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-3" th:hidden="${month!='枯'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>平段：</label>
                <div class="col-sm-8">
                    <input id="kP" name="kP" th:field="*{kP}" class="form-control tx" type="number">
                </div>
            </div>
        </div>
        <div class="col-md-3" th:hidden="${month!='枯'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>谷段：</label>
                <div class="col-sm-8">
                    <input id="kG" name="kG" th:field="*{kG}" class="form-control tx" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-3" th:hidden="${month!='枯'}">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="枯水期电量峰段加枯水期电量平段加枯水期电量谷段">小计：</label>
                <div class="col-sm-8">
                    <input id="kTotal" name="kTotal" th:field="*{kTotal}" class="form-control srk"
                           readonly="true" type="number">
                </div>
            </div>
        </div>
        <div class="col-md-12">

        </div>
        <div class="col-md-3">

        </div>
        <div class="col-md-3">

        </div>
        <div class="col-md-3">

        </div>
        <div class="col-md-3" style="display:none;">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="峰水期电量小计加平水期电量小计加枯水期电量小计">留存电量合计：</label>
                <div class="col-sm-8">
                    <input id="keepTotal" name="keepTotal" th:field="*{keepTotal}" class="form-control srk"
                           readonly="true"  type="number">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <hr style="height:1px;border:none;border-top:1px solid #555555;" />

        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" ><label class="spty">*</label>留存电量电厂交易价格：</label>
                <div class="col-sm-8">
                    <input id="factoryPrice" name="factoryPrice" th:field="*{factoryPrice}" class="form-control tx"
                           type="number">
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="电厂交易价格乘以留存电量合计">富余电量上网电费：</label>
                <div class="col-sm-8">
                    <input id="upAccount" name="upAccount" th:field="*{upAccount}"  class="form-control srk"
                           readonly="true" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-4">
        </div>

        <div class="col-md-12">
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" ><label class="spty">*</label>输配电价：</label>
                <div class="col-sm-8">
                    <input id="sPPrice" name="sPPrice" th:field="*{sPPrice}" class="form-control tx" type="number">
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"  th:alt-title="输配电价乘以交易电量合计">输配收入金额：</label>
                <div class="col-sm-8">
                    <input id="sPAccount" name="sPAccount" th:field="*{sPAccount}" class="form-control srk"
                           readonly="true"  type="number">
                </div>
            </div>
        </div>

        <div class="col-md-4">
        </div>
        <div class="col-md-12">
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" ><label class="spty">*</label>基金均价：</label>
                <div class="col-sm-8">
                    <input id="jJAverage" name="jJAverage" th:field="*{jJAverage}" class="form-control tx"
                           type="number">
                </div>
            </div>
        </div>

        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="基金均价乘以交易电量合计">政府性基金及附加：</label>
                <div class="col-sm-8">
                    <input id="jJAccount" name="jJAccount" th:field="*{jJAccount}" class="form-control srk"
                           readonly="true"  type="number">
                </div>
            </div>
        </div>

        <div class="col-md-4">
        </div>

        <div class="col-md-12">
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"    >到户均价：</label>
                <div class="col-sm-8">
                    <input id="dHAverage" name="dHAverage" th:field="*{dHAverage}"
                           class="form-control srk"  type="number" readonly="true">
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="到户均价乘以交易电量合计" >用户承担电费金额：</label>
                <div class="col-sm-8">
                    <input id="eleAccount" name="eleAccount" th:field="*{eleAccount}" class="form-control srk"
                           readonly="true" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-4">
            <a class="btn btn-success" onclick="submitHandler()" >
                <i class="fa fa-hand-peace-o"></i> 计算
            </a>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "service/keep"
    $("#form-keep-edit").validate({
        rules: {
            fF:{
                required:true,
            },
            fP:{
                required:true,
            },
            fG:{
                required:true,
            },
            pF:{
                required:true,
            },
            pP:{
                required:true,
            },
            pG:{
                required:true,
            },
            kF:{
                required:true,
            },
            kP:{
                required:true,
            },
            kG:{
                required:true,
            },
            factoryPrice:{
                required:true,
            },
            sPPrice:{
                required:true,
            },
            jJAverage:{
                required:true,
            },


        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.saveAndRefer(prefix + "/edit", $('#form-keep-edit').serialize());
        }
    }
</script>
</body>
</html>
